package com.ruoyi;

import com.ruoyi.RuoYiApplication;
import com.ruoyi.system.domain.SysPost;
import com.ruoyi.system.service.ISysPostService;
import com.ruoyi.system.service.ISysUserService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;

@SpringBootTest(classes = RuoYiApplication.class)
@RunWith(SpringRunner.class)
public class test1 {
    @Autowired
    ISysPostService iSysPostService;
    @Resource
    ISysUserService iSysUserService;
    @Test

    public void test(){
        SysPost sysPost = iSysPostService.selectPostById(1L);
        System.out.println(sysPost);

    }

    @Test
    public void test2(){
        String admin = iSysUserService.checkUserNameUnique("admin");
        System.out.println(admin);
    }

    @Test
    public void test3(){
        int i = iSysUserService.deleteUserById(2L);
        System.out.println(i);
    }

}
